package com.zzc.qqchat.repository;

import com.zzc.qqchat.domain.UserInfor;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.Optional;

public interface UserInforRep extends JpaRepository<UserInfor,Integer> {

    @Query(value = "select * from user  where user_Id=?1",nativeQuery = true)
    UserInfor findByuserId(int userId);

    @Query(value = "select * from user  where user_Id=?1",nativeQuery = true)
    Optional<UserInfor> findById(int Id);
}
